require('./PagePayprogress.styl');

const reactMixin = require('react-mixin');
const Actions = require('./actions');
const Store = require('./store');
const {Timeline,Icon} = SaltUI;
import { Control } from 'react-keeper';
import Payprogressbar from 'components/payprogressbar' 
const ui = require('clientConfig/util/jsapi/ui');
import { monStorage , Storage} from 'clientConfig/util/StoreData'

class Payprogress extends React.Component {

    constructor(props) {
        super(props);
        this.state = {
        };
    }

    render() {
        return (
            <div className="payprogress">
                <Payprogressbar data={this.state.data}/>
            </div>
        );
    }

    componentWillMount() {
        ui.setTitle({ title:"项目进度" });
    }

    componentDidMount() {
        if(Control.state&&(Control.state.origin.includes('workplan')||Control.state.origin.includes('tender'))){
            Actions.getProcess({process_id:Control.state.process_id})
        }else{
            Actions.fetch({process_id:Control.state.process_id, unionid: monStorage.get('user.unionid')})
        }
        
    }

    componentWillReceiveProps(nextProps) {
    }

    shouldComponentUpdate(nextProps, nextState) {
        return true;
    }

    componentWillUpdate(nextProps, nextState) {
    }

    componentDidUpdate(prevProps, prevState) {
    }

    componentWillUnmount() {
    }
}

reactMixin.onClass(Payprogress, Reflux.connect(Store));

module.exports = Payprogress;
